package com.example.myapplication.pojo;

public  class SingleUser {
    private  volatile static SingleUser singleUser;

    private   User user=new User();

    private SingleUser() {

    }

    public  User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public static SingleUser getInstance() {
        if (singleUser == null) {
            synchronized (SingleUser.class) {
                if (singleUser == null) {
                    singleUser = new SingleUser();
                }
            }
        }
        return singleUser;
    }


}
